<template>
  <div class="hello">
    <h1>{{ msg }}</h1>
<!--    <form>-->
<!--      <div>-->
<!--        <p>用户名</p><input placeholder="请输入">-->
<!--      </div>-->
<!--      <div>-->
<!--        <p>密码</p><input placeholder="请输入">-->
<!--      </div>-->
<!--      <button type="submit" @click="submitLogin">登录</button>-->
<!--    </form>-->
    <button type="submit" @click="submitLogin">登录</button>
    <h1>{{ test }}</h1>
  </div>

</template>

<script>
  export default {
    name: 'hello',
    data () {
      return {
        msg: 'shenbr！',
        test: null
      }
    },
    methods: {
      submitLogin() {
        this.getTest().then(resp => {
          this.test = resp;
        })
      }
    }
  }
</script>